package chapter04.Example15_17;
class Amimal3{
    public void  shout(){
        System.out.println("动物叫");
    }
}
class Dog3 extends Amimal{
    public void  shout(){
        System.out.println("汪汪");
    }
    public void eat(){
        System.out.println("吃屎");
    }
}
public class Example17 {
    public static void main(String[] args) {
     Animal al = new Dog();
     System.out.println("Animal al =new Dog(): " +(al instanceof Dog));
     System.out.println("Animal al =new Dog(): " +(al instanceof Animal));
     Animal a2 = new Dog();
     System.out.println("Animal al =new Dog(): " +(a2 instanceof Dog));
     System.out.println("Animal al =new Dog(): " +(a2 instanceof Animal));
    }
}


